import 'package:flutter/material.dart';

// ignore: must_be_immutable
class RowUnEditItemWidget extends StatelessWidget {
  final String title;
  final String content;
  final bool isLine;

  RowUnEditItemWidget({this.title, this.content, this.isLine = true});

  @override
  Widget build(BuildContext context) {
    return buildWidgetItem(context);
  }

  Widget buildWidgetItem(BuildContext context) {
    return Container(
      color: Colors.white,
      child: Column(
        children: <Widget>[
          Container(
            height: 48,
            padding: EdgeInsets.only(left: 16, right: 16),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              children: <Widget>[
                Container(
                  width: 110,
                  child: Text(
                    title ?? "",
                    textAlign: TextAlign.left,
                    style: TextStyle(color: Color(0xff666666), fontSize: 14),
                  ),
                ),
                Spacer(),
                Text(
                  content ?? "",
                  textAlign: TextAlign.right,
                  style: TextStyle(color: Color(0xff333333), fontSize: 14),
                ),
              ],
            ),
          ),
          Container(
            padding: EdgeInsets.only(left: 16),
            child: Offstage(
              offstage: !isLine,
              child: Container(
                height: 0.5,
                color: Color(0xffebebeb),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
